//
//  input.c
//  OperatingSystem
//
//  Created by Jay Fernandez on 3/15/12.
//  Copyright (c) 2012 University of Washington Tacoma. All rights reserved.
//

#include <stdio.h>

int main(int argc, const char * argv[]) {
    int schedule_type;
    int process_num;
    int i = 0;
    
    printf("Enter the type of scheduler:\n");
    printf("1. Round-robin\n");
    printf("2. Priority\n");
    printf("3. Lottery\n");
    scanf("%d", &schedule_type);
    printf("\n");
    
    printf("Enter how many processes to include:\n");
    scanf("%d", &process_num);
    printf("\n");
    int process_array[process_num];
    
    do {
        printf("Enter the type of process to add:\n");
        printf("1. Calc\n");
        printf("2. Producer\n");
        printf("3. Consumer\n");
        printf("4. UI\n");
        scanf("%d", &process_array[i]);
        printf("\n");
        if (process_array[i] > 4) {
            printf("Please enter a number 1-4.\n");
            printf("\n");
            continue;
        }
        i++;
    } while (i < process_num);
    
    printf("Schedule type: %d\n", schedule_type);
    for (i = 0; i < process_num; i++) {
        printf("Process number: %d\n", process_array[i]);
    }
    return 0;
}

void output() {
    printf("Scheduler: Running process %d (%c) next", pid, );
}